package com.laijiale.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Pattern;

/**
 * @author laijiale
 * @date 2024年08月04日 16:36
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class LoginDTO {
    @Schema(description = "登录账号")
    private String username;

    @Pattern(regexp = "^[a-zA-Z0-9_-]{4,16}$",
            message = "登录密码必须由4-16位的数字，字母，下划线或横线组成")
    @Schema(description = "登录密码")
    private String password;

}
